package com.ugoodtech.mdcc.core.repository;

import com.ugoodtech.mdcc.core.domain.CustomerManageNote;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface CustomerManageNoteRepository extends PagingAndSortingRepository<CustomerManageNote, Long>
        , QueryDslPredicateExecutor<CustomerManageNote> {

    @Query("from CustomerManageNote where deleted=false and enabled=true and customer_report_id=:reportId")
    List<CustomerManageNote> findAllByReportId(@Param("reportId") Long reportId);
}
